Skip to content

test(core): split public header compilation into 256 batches - #2074

Open
Thimo188 wants to merge 1 commit into
mainfrom
upstream-pr/28294
Open

Thimo188 wants to merge 1 commit into
mainfrom
upstream-pr/28294

Conversation

@Thimo188

@Thimo188 Thimo188 commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Imported from boykopovar/AnyPS5#28294, originally opened by samu-mi8.

Source commit: af69e1bf59443fcc243cded3aa61811df3f96719. The import branch preserves this fetched upstream PR snapshot. The description and validation below are copied from upstream; no new code changes or test runs were made for this import. Original reviews, discussions, and attachments remain at the linked upstream PR.


What

The 64 public_headers_compile_<n> tests have TIMEOUT 30 and no longer fit in it on a Windows laptop: each runs about 18 g++ -fsyntax-only units in sequence, and the public headers keep growing. This splits the same units into 256 batches. The timeout is unchanged and no unit is added or removed.

The slowest unit includes all 413 umbrella headers and cannot be split by the batch count, so its batch needs few other units. With 160 batches that batch took 28 s; with 256 it takes 17.5 s and 18.7 s.

Tested

Windows 11 Home (10.0.26300), Intel Core i7-10750H (6 cores, 12 threads), WinLibs GCC 15.2.0 r7, Release, main 335fd4626f, ctest -R '^public_headers' -j 8, two runs each with the batch change applied to that commit. The branch was then rebased onto current main without rebuilding.

Batches Timed out Median Slowest Total time
64 (main) 4 of 64, both runs 19.7 s, 18.6 s over 30 s 195 s, 192 s
160 0 8.2 s, 8.7 s 28.1 s, 27.6 s 216 s, 223 s
256 (this PR) 0 4.7 s, 4.7 s 18.8 s, 18.7 s 227 s, 222 s

The total time of main excludes the work of its killed tests. In a full ctest -j 8 sweep of 335fd4626f, 8 of the 64 timed out; all 8 passed when rerun serially (6.5 to 12.6 s). No other sweep I found reports these timeouts. 192 was measured only outside ctest, so it is not in the table.

python3 tools/check_conventions.py and python3 tools/tests/test_build_changed_guest_tests.py pass (its public_headers_compile_\d+ pattern accepts any index). tools/pr_overlap.py --branch could not compare four open PRs that conflict with main (boykopovar#25470, boykopovar#25477, boykopovar#25493, boykopovar#25500); none of their diffs changes these lines.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Summary by CodeRabbit

  • Tests
    • Increased the number of batches used for public-header compilation tests from 64 to 256.

The 64 public_headers_compile tests reach their 30 s timeout on an
i7-10750H under Windows with ctest -j 8: 4 of 64 time out on each run of
main 335fd46. The slowest unit includes all 413 umbrella headers and
cannot be split further, so a batch that holds it needs few other units.

With 256 batches the slowest takes 18.8 s and 18.7 s in two runs, and
none times out. With 160 the slowest took 28.1 s and 27.6 s.
@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Public-header compile tests

Layer / File(s) Summary
Update compile-test batch count
core/libs/CMakeLists.txt
The loop registers batch indices 0–255 and sets --batch-count to 256.

Change: Other

Merge Risk: Minimal · up to af69e

This change splits the public-header compile tests into more, smaller batches so they are less likely to hit the timeout. It only affects test scheduling, and each batch still selects at least one header group. No merge-blocking risk remains.

Architecture risk: Low · up to af69e

The test harness expands public-header compilation from 64 to 256 scheduled batches without changing how the check selects or compiles headers.

Changed areas: core

Review details

Systems and components

  • observed — 1 changed file mapped to core.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 1
  • Waived: $0.25 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4d41be76-65fd-4086-a5bb-49311cdecd5e
Commits

Reviewing files that changed from the base of the PR and between 4131f51 and af69e1b.

Files selected for processing: 1

  • core/libs/CMakeLists.txt

Limit details: You’ve used all 10 included reviews currently available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants